package com.weigang.webcors8080.controller;

import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/book")
public class BookController {


//    @CrossOrigin (value = "http://localhost:8081", maxAge = 1800 , allowedHeaders="*")
    @PostMapping("/")
    public String addBook(String name){
        return "receive：" + name;
    }

//    @CrossOrigin (value = "http://localhost:8081", maxAge = 1800 , allowedHeaders="*")
    @DeleteMapping("/{id}")
    public String deleteBook(@PathVariable(value = "id") String id){
        return "receive：" + id;
    }
}
